﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CloudClip.Clip;

namespace CloudClip.ExtensionMethod
{
    public static class ClipboardExtension
    {
        public static IClipUnit ToClipUnit(this IDataObject iDataObject)
        {
            //目前判斷文字以外的就不做
            //if (iDataObject.GetDataPresent(DataFormats.Text) == false)
            //{
            //}

            return new TextClipUnit(iDataObject.GetData(DataFormats.Text).ToString());         
        }

    }
}
